<template>
    <div>
        <input type="text" ref="count">
    </div>
    <ChildRef ref="childRef"/>
</template>

<script setup>
import { useTemplateRef, watchEffect } from 'vue';
import ChildRef from './ChildRef.vue';
const count = useTemplateRef('count')
const childRef = useTemplateRef('childRef')

watchEffect(()=>{
    console.log(count.value);
    console.log(childRef.value?.num);
    console.log(childRef.value?.name);
    
    
})
</script>

<style scoped>

</style>